﻿using System;
using System.Data;
using System.Data.Common;
using Hxj.Data;
using Hxj.Data.Common;

namespace RecruitStudents.Utility.Model
{

	/// <summary>
	/// 实体类TB_Rule_CalculateScore 。(属性说明自动提取数据库字段的描述信息)
	/// </summary>
	[Serializable]
	public class TB_Rule_CalculateScore : Entity 
	{
		public TB_Rule_CalculateScore():base("TB_Rule_CalculateScore") {    _CalculateScoreID=Guid.NewGuid().ToString();}

		#region Model
		private string _CalculateScoreID;
		private string _CalculateScoreNo;
		private string _CalculateScoreName;
		private string _CalculateScoreType;
		private string _ExamYear;
		/// <summary>
		/// 主键
		/// </summary>
		public string CalculateScoreID
		{
			get{ return _CalculateScoreID; }
			set
			{
				this.OnPropertyValueChange(_.CalculateScoreID,_CalculateScoreID,value);
				this._CalculateScoreID=value;
			}
		}
		/// <summary>
		/// 算分规则代码
		/// </summary>
		public string CalculateScoreNo
		{
			get{ return _CalculateScoreNo; }
			set
			{
				this.OnPropertyValueChange(_.CalculateScoreNo,_CalculateScoreNo,value);
				this._CalculateScoreNo=value;
			}
		}
		/// <summary>
		/// 算分规则名称
		/// </summary>
		public string CalculateScoreName
		{
			get{ return _CalculateScoreName; }
			set
			{
				this.OnPropertyValueChange(_.CalculateScoreName,_CalculateScoreName,value);
				this._CalculateScoreName=value;
			}
		}
		/// <summary>
		/// 算分规则类型
		/// </summary>
		public string CalculateScoreType
		{
			get{ return _CalculateScoreType; }
			set
			{
				this.OnPropertyValueChange(_.CalculateScoreType,_CalculateScoreType,value);
				this._CalculateScoreType=value;
			}
		}
		/// <summary>
		/// 考试年度
		/// </summary>
		public string ExamYear
		{
			get{ return _ExamYear; }
			set
			{
				this.OnPropertyValueChange(_.ExamYear,_ExamYear,value);
				this._ExamYear=value;
			}
		}
		#endregion

		#region Method
		/// <summary>
		/// 获取实体中的主键列
		/// </summary>
		public override Field[] GetPrimaryKeyFields()
		{
			return new Field[] {
				_.CalculateScoreID};
		}
		/// <summary>
		/// 获取列信息
		/// </summary>
		public override Field[] GetFields()
		{
			return new Field[] {
				_.CalculateScoreID,
				_.CalculateScoreNo,
				_.CalculateScoreName,
				_.CalculateScoreType,
				_.ExamYear};
		}
		/// <summary>
		/// 获取值信息
		/// </summary>
		public override object[] GetValues()
		{
			return new object[] {
				this._CalculateScoreID,
				this._CalculateScoreNo,
				this._CalculateScoreName,
				this._CalculateScoreType,
				this._ExamYear};
		}
		/// <summary>
		/// 给当前实体赋值
		/// </summary>
		public override void SetPropertyValues(IDataReader reader)
		{
			this._CalculateScoreID = DataUtils.ConvertValue<string>(reader["CalculateScoreID"]);
			this._CalculateScoreNo = DataUtils.ConvertValue<string>(reader["CalculateScoreNo"]);
			this._CalculateScoreName = DataUtils.ConvertValue<string>(reader["CalculateScoreName"]);
			this._CalculateScoreType = DataUtils.ConvertValue<string>(reader["CalculateScoreType"]);
			this._ExamYear = DataUtils.ConvertValue<string>(reader["ExamYear"]);
		}
		/// <summary>
		/// 给当前实体赋值
		/// </summary>
		public override void SetPropertyValues(DataRow row)
		{
			this._CalculateScoreID = DataUtils.ConvertValue<string>(row["CalculateScoreID"]);
			this._CalculateScoreNo = DataUtils.ConvertValue<string>(row["CalculateScoreNo"]);
			this._CalculateScoreName = DataUtils.ConvertValue<string>(row["CalculateScoreName"]);
			this._CalculateScoreType = DataUtils.ConvertValue<string>(row["CalculateScoreType"]);
			this._ExamYear = DataUtils.ConvertValue<string>(row["ExamYear"]);
		}
		#endregion

		#region _Field
		/// <summary>
		/// 字段信息
		/// </summary>
		public class _
		{
			/// <summary>
			/// * 
			/// </summary>
			public readonly static Field All = new Field("*","TB_Rule_CalculateScore");
			/// <summary>
			/// 主键
			/// </summary>
			public readonly static Field CalculateScoreID = new Field("CalculateScoreID","TB_Rule_CalculateScore","主键");
			/// <summary>
			/// 算分规则代码
			/// </summary>
			public readonly static Field CalculateScoreNo = new Field("CalculateScoreNo","TB_Rule_CalculateScore","算分规则代码");
			/// <summary>
			/// 算分规则名称
			/// </summary>
			public readonly static Field CalculateScoreName = new Field("CalculateScoreName","TB_Rule_CalculateScore","算分规则名称");
			/// <summary>
			/// 算分规则类型
			/// </summary>
			public readonly static Field CalculateScoreType = new Field("CalculateScoreType","TB_Rule_CalculateScore","算分规则类型");
			/// <summary>
			/// 考试年度
			/// </summary>
			public readonly static Field ExamYear = new Field("ExamYear","TB_Rule_CalculateScore","考试年度");
		}
		#endregion


	}
}

